import Vue from 'vue'
import Router from 'vue-router'
import axios from 'axios'
import VueAxios from 'vue-axios'

import IndexPage from '@/pages/index'

import DetailPage from '@/pages/detail'
import DetailAnaPage from '@/pages/detail/analysis'
import DetailCountPage from '@/pages/detail/count'
import DetailForecastPage from '@/pages/detail/forecast'
import DetailPublishPage from '@/pages/detail/publish'

Vue.use(Router)
Vue.use(VueAxios, axios)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      component: IndexPage 
    },
    {
      path: '/detail',
      component: DetailPage,
      children:[ {
        path: 'analysis',
        component: DetailAnaPage 
      },{
        path:'count',
        component: DetailCountPage 
      },{
        path:'forecast',
        component: DetailForecastPage 
      },{
        path:'publish',
        component: DetailPublishPage 
      }]
    }
  ]
})
